
#include <UnitTest++.h>
#include <string>
#include <iostream>
#include "money.h"

/* TODO:
friend const Dollar operator*(const Dollar& rhs, const Dollar lhs);
hashCode()
Equal null
Equal object
Convert
*/

TEST(CheckMathRound)
{
	CHECK_EQUAL(3.142, math::round(3.141516, 3));
	CHECK_EQUAL(4.0, math::round(3.5, 0));
	CHECK_EQUAL(-1.25, math::round(-1.253, 2));
}

using namespace money;

TEST(CheckCurrenciesCreation)
{
	Euro euro(50.235);
	Dollar some(3.50);
	Yen yen(124.32);

	CHECK(some == 3.50);
	CHECK(euro == 50.24);
	CHECK(yen  == 124);
	
	CHECK_EQUAL(some, 3.50);
	CHECK_EQUAL(euro, 50.24);
	CHECK_EQUAL(yen, 124);
}

int main()
{
    return UnitTest::RunAllTests();
}

